import fetch from 'common/src/utils/fetch';

export function findList(data) {
  return fetch({
    url:
      '/api/majorservice/virtueResult/list',
    method: 'post',
    headers: { 'Content-Type': 'application/json' },
    data
  });
}
export function findClassPower (data) {
  return fetch({
    url: '/api/welcomeservice/tutorSchool/major/' + data,
    method: 'get',
    headers: { 'Content-Type': 'application/json' },
    data
  });
}

export function syncData() {
  return fetch({
    url: '/api/majorservice/virtueResult/synchronous',
    method: 'post',
    headers: { 'Content-Type': 'application/json' }
  });
}

// 联动根据年级查询大类
export function getMajorByGrade(data) {
  return fetch({
    url: '/api/welcomeservice/tutorSchool/major/' + data,
    method: 'get',
    headers: {
      'Content-Type': 'application/json'
    },
    data
  });
}

export function exportData(data) {
  return fetch({
    url: `/api/majorservice/virtueResult/exportList`,
    method: 'post',
    data: data,
    showMask: false
  });
}

export function getReportStatus(key) {
  return fetch({
    url: `/api/majorservice/common/exportExcelResult/${key}`,
    method: 'get'
  });
}
